home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / QuickTime Mac / CIncludes / ATSLayoutTypes.h next >
Encoding:
C/C++ Source or Header  |  1998-04-09  |  4.1 KB  |  155 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ATSLayoutTypes.h
  3.  
  4.      Contains:    Apple Text Services layout public structures and constants.
  5.  
  6.      Version:    Technology:    Allegro
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __ATSLAYOUTTYPES__
  19. #define __ATSLAYOUTTYPES__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __SFNTTYPES__
  25. #include <SFNTTypes.h>
  26. #endif
  27. #ifndef __SFNTLAYOUTTYPES__
  28. #include <SFNTLayoutTypes.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53. /* ----------------------------------------------------------------------------------------- */
  54. /* CONSTANTS */
  55. /* LineOptions flags */
  56.  
  57. enum {
  58.     kATSLineNoLayoutOptions        = 0x00000000,
  59.     kATSLineIsDisplayOnly        = 0x00000001,
  60.     kATSLineHasNoHangers        = 0x00000002,
  61.     kATSLineHasNoOpticalAlignment = 0x00000004,
  62.     kATSLineKeepSpacesInMargin    = 0x00000008,
  63.     kATSLineTwoLevelReordering    = 0x00000010,
  64.     kATSLineLeftEdgeNotMargin    = 0x00000020,
  65.     kATSLineRightEdgeNotMargin    = 0x00000040,
  66.     kATSLineDoReordering        = 0x00000080,
  67.     kATSLineNoJustPostComp        = 0x00000100
  68. };
  69.  
  70. /* Run controls flags (in the style rec) */
  71.  
  72. enum {
  73.     kATSRunNoLigatureSplits        = (long)0x80000000,
  74.     kATSRunNoCaretAngle            = 0x40000000,
  75.     kATSRunImposeWidth            = 0x20000000,
  76.     kATSRunNoCrossKerning        = 0x10000000,
  77.     kATSRunNoOpticalAlignment    = 0x08000000,
  78.     kATSRunForceHanging            = 0x04000000,
  79.     kATSRunNoSpecialJustification = 0x02000000,
  80.     kATSRunIsVertical            = 0x01000000,
  81.     kATSRunDirectionOverrideMask = 0x00000003
  82. };
  83.  
  84. /* Direction overrides */
  85.  
  86. enum {
  87.     kATSNoDirectionOverride        = 0,
  88.     kATSImposeLeftToRight        = 1,
  89.     kATSImposeRightToLeft        = 2
  90. };
  91.  
  92. /* Miscellaneous constants */
  93.  
  94. enum {
  95.     kATSNoTracking                = (long)0x80000000,                /* negativeInfinity */
  96.     kATSDeletedGlyphcode        = 0xFFFF,
  97.     kATSSelectToEnd                = (long)0xFFFFFFFF,
  98.     kATSOffsetToNoData            = (long)0xFFFFFFFF
  99. };
  100.  
  101. /* --------------------------------------------------------------------------- */
  102. /* TYPES */
  103. /* --------------------------------------------------------------------------- */
  104. typedef UInt32                             ATSLineLayoutOptions;
  105. /*
  106.     The JustWidthDeltaEntryOverride structure specifies values for the grow and shrink case during
  107.     justification, both on the left and on the right. It also contains flags.  This particular structure
  108.     is used for passing justification overrides to LLC.
  109. */
  110.  
  111. struct ATSJustWidthDeltaEntryOverride {
  112.     Fixed                             beforeGrowLimit;            /* ems AW can grow by at most on LT */
  113.     Fixed                             beforeShrinkLimit;            /* ems AW can shrink by at most on LT */
  114.     Fixed                             afterGrowLimit;                /* ems AW can grow by at most on RB */
  115.     Fixed                             afterShrinkLimit;            /* ems AW can shrink by at most on RB */
  116.     JustificationFlags                 growFlags;                    /* flags controlling grow case */
  117.     JustificationFlags                 shrinkFlags;                /* flags controlling shrink case */
  118. };
  119. typedef struct ATSJustWidthDeltaEntryOverride ATSJustWidthDeltaEntryOverride;
  120. /* The JustPriorityOverrides type is an array of 4 width delta records, one per priority level override. */
  121.  
  122. typedef ATSJustWidthDeltaEntryOverride     ATSJustPriorityWidthDeltaOverrides[4];
  123. /*
  124.     The JustGlyphWidthDeltaOverride structure specifies justification override information for a
  125.     single specified glyph.
  126. */
  127.  
  128. struct ATSJustGlyphWidthDeltaOverride {
  129.     UInt16                             glyph;
  130.     ATSJustWidthDeltaEntryOverride     override;
  131. };
  132. typedef struct ATSJustGlyphWidthDeltaOverride ATSJustGlyphWidthDeltaOverride;
  133. /* --------------------------------------------------------------------------- */
  134.  
  135. #if PRAGMA_STRUCT_ALIGN
  136.     #pragma options align=reset
  137. #elif PRAGMA_STRUCT_PACKPUSH
  138.     #pragma pack(pop)
  139. #elif PRAGMA_STRUCT_PACK
  140.     #pragma pack()
  141. #endif
  142.  
  143. #ifdef PRAGMA_IMPORT_OFF
  144. #pragma import off
  145. #elif PRAGMA_IMPORT
  146. #pragma import reset
  147. #endif
  148.  
  149. #ifdef __cplusplus
  150. }
  151. #endif
  152.  
  153. #endif /* __ATSLAYOUTTYPES__ */
  154.  
  155.